<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
  <th:block th:include="include :: header('修改客户评估')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
  <form class="form-horizontal m" id="form-projectCustomerEvaluate-edit" th:object="${projectCustomerEvaluate}">
    <input id="evaluateId" name="evaluateId" th:field="*{evaluateId}" type="hidden">
    <input name="projectPrice" th:field="*{projectPrice}" type="hidden" >
    <div class="form-group">
      <label class="col-sm-3 control-label">项目金额（元）：</label>
      <div class="col-sm-6">
        <input th:field="*{projectPrice}" class="form-control" type="text" readonly>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-3 control-label"><span style="color: red; ">*</span>客户价值：</label>
      <div class="col-sm-6">
        <select name="evalType" class="form-control m-b" th:with="type=${@dict.getType('eval_level')}" required>
          <option value="">--请选择--</option>
          <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{evalType}"></option>
        </select>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-3 control-label"><span style="color: red; ">*</span>折扣率：</label>
      <div class="col-sm-6">
        <input id="discountRate" name="discountRate" th:field="*{discountRate}" class="form-control" type="text" maxlength="2" required>
      </div>
      <label class="control-label">(%)</label>
    </div>
  </form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
  var prefix = ctx + "project/projectCustomerEvaluate";
  $("#form-projectCustomerEvaluate-edit").validate({
    rules: {
      discountRate: {
        digits:true
      }
    },
    focusCleanup: true
  });

  function submitHandler() {
    if ($.validate.form()) {
      $.operate.save(prefix + "/edit", $('#form-projectCustomerEvaluate-edit').serialize());
    }
  }
</script>
</body>
</html>
